﻿/*
 * Copyright 2010 Pieter De Rycke
 *
 * This file is part of Frozen Bubble XNA.
 *
 * Frozen Bubble XNA is free software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * version 2, as published by the Free Software Foundation.
 *
 * Frozen Bubble XNA is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with Frozen Bubble XNA. If not, see 
 * <http://www.gnu.org/licenses/>.
 *
 * Artwork:
 *    Alexis Younes <73lab at free.fr>
 *      (everything but the bubbles)
 *    Amaury Amblard-Ladurantie <amaury at linuxfr.org>
 *      (the bubbles)
 *
 * Soundtrack:
 *    Matthias Le Bidan <matthias.le_bidan at caramail.com>
 *      (the three musics and all the sound effects)
 *
 * Design & Programming:
 *    Guillaume Cottenceau <guillaume.cottenceau at free.fr>
 *      (design and manage the project, whole Perl sourcecode)
 *
 * XNA and Windows Phone 7 port:
 *    Pieter De Rycke
 *
 * Websites:
 *    http://www.frozen-bubble.org/
 *    http://pieterderycke.wordpress.com/
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using System.Diagnostics;

namespace FrozenBubble
{
    public class BackgroundScreen : GameScreen
    {
        private Texture2D background;

        public override void LoadContent()
        {
#if DEBUG
            long start = DateTime.Now.Ticks;
#endif

#if WINDOWS_PHONE
            background = Cache.BackgroundOnePlayer;
#else
            background = Game.Content.Load<Texture2D>("Graphics/back_one_player");
#endif

#if DEBUG
            long loadTime = (DateTime.Now.Ticks - start) / 10000;
            Debug.WriteLine("Loadtime BackgroundScreen.cs: " + loadTime);
#endif
        }

        public override void Draw(GameTime gameTime)
        {
            SpriteBatch.Draw(background, ScreenManager.ViewportRectangle, Color.White);
        }
    }
}
